package cn.qihua.service;

import java.util.List;

import cn.qihua.dao.IBaseProductDAO;
import cn.qihua.model.BaseProduct;

public interface IProductService {

	public abstract List<BaseProduct> findAll();

	public abstract List<BaseProduct> findAll(int start, int limit);

	public abstract List<BaseProduct> findByNow(int after, int start, int limit);

	public abstract List<BaseProduct> findByProperty(String propertyName,
			Object value);

	public abstract List<BaseProduct> searchByProperty(String propertyName,
			String value, int start, int limit);

	public abstract List<BaseProduct> searchByProperty(String propertyName,
			String value);

	public abstract List<BaseProduct> findByProperty(String propertyName,
			Object value, int start, int limit);

	public abstract Integer getTotal();

	public abstract Integer getTotalByWhere(String where);

	public abstract List<BaseProduct> findByStatus(String status, int start,
			int limit);

	public abstract Integer getTotalByProperty(String propertyName, Object value);

	public abstract Integer getTotalBySearch(String propertyName, String value);

	public abstract boolean changeStatus(int id, Boolean value);

	public abstract boolean changePropertyById(int id, String field,
			Object value);

	public abstract boolean changeProgress(int id, String value);

	public abstract boolean changeYears(int id, int value);

	public abstract BaseProduct findById(Integer id);

	public abstract Boolean add(BaseProduct transientInstance);

	public abstract Boolean add(int orderId, BaseProduct transientInstance);

	public abstract boolean del(Integer id);

	public abstract void edit(BaseProduct transientInstance);

	public abstract void setBaseProductDAO(IBaseProductDAO baseProductDAO);

	public abstract Boolean update(BaseProduct transientInstance);

}